import request from './request.js'

const user = {
	//注册
	logon(data) {
		return request.post('/common/logon', data)
	},
	//登录
	login(data) {
		return request.post('/common/login', data)
	},
	//获取用户信息
	getUserInfo(id){
		return request.get(`/user/userInfo?${id?`userid=${id}`:''}`)
	},
	//更新用户信息
	updataUserInfo(data){
		return request.post('/user/updataUserInfo', data)
	},
	//重置密码
	resetPassword(data){
		return request.post('/common/resetPassword', data)
	},
	//获取文章列表
	getArticleList(data){
		return request.post('/common/getArticleList', data)
	},
	//根据type获取文章
	getArticleListType(data){
		return request.post('/common/getArticleListType', data)
	},
	getArticleListId(data){
		return request.post('/common/getArticleListId', data)
	},
	//获取用户列表
	getUserList(data){
		return request.post('/user/getUserList', data)
	},
	//获取微博、关注、粉丝 数量
	getUserDetial(data) {
		return request.post('/user/getUserDetial', data)
	},
	//判断是否设置支付密码
	checkUserPaymentPwd(data) {
		return request.get('/user/checkUserPaymentPwd', data)
	}
}
export default user
